package com.example.test.webinterfacetest.util;

import lombok.Data;

import java.io.Serializable;

/**
 * @ClassName Result
 * @Description TODO
 * @Author lumyc
 * @Date 2022/12/23 14:20
 * @Version 1.0
 */
@Data
public class Result<T> implements Serializable {
    private String code;
    private String message;
    private T data;

    public static <T> Result<T> success(T data){
        Result<T> result = new Result<>();
        result.setCode("200");
        result.setMessage("success");
        result.setData(data);
        return result;
    }
}
